home *** CD-ROM | disk | FTP | other *** search
Wrap
/* File: OCEMailbox.h Contains: Apple Open Collaboration Environment OCEMaibox Interfaces. Version: Technology: AOCE Toolbox 1.02 Release: Universal Interfaces 3.0d3 on Copland DR1 Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, send the file and version information (from above) and the problem description to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS */ #ifndef __OCEMAILBOX__ #define __OCEMAILBOX__ #ifndef __OCE__ #include <OCE.h> #endif #ifndef __OCEMAIL__ #include <OCEMail.h> #endif #ifndef __OCEMESSAGING__ #include <OCEMessaging.h> #endif #ifndef __OCESTANDARDMAIL__ #include <OCEStandardMail.h> #endif #ifdef __cplusplus extern "C" { #endif #if PRAGMA_IMPORT_SUPPORTED #pragma import on #endif #if PRAGMA_ALIGN_SUPPORTED #pragma options align=mac68k #endif #if FOR_SYSTEM7_ONLY /* opaque references, iterators, and progress indicator */ typedef struct OpaqueOpaqueMBMailboxRef* OpaqueMBMailboxRef; typedef struct OpaqueOpaqueMBContainerRef* OpaqueMBContainerRef; typedef struct OpaqueOpaqueMBMailboxIterator* OpaqueMBMailboxIterator; typedef struct OpaqueOpaqueMBMailItemIterator* OpaqueMBMailItemIterator; typedef struct OpaqueOpaqueMBProgressIndicator* OpaqueMBProgressIndicator; typedef struct OpaqueOpaqueMBCopyOperationRef* OpaqueMBCopyOperationRef; typedef struct OpaqueOpaqueMBNotificationRef* OpaqueMBNotificationRef; typedef OpaqueMBMailboxRef *MBMailboxRef; typedef OpaqueMBContainerRef *MBOpenContainerRef; typedef OpaqueMBMailboxIterator *MBMailboxIterator; typedef OpaqueMBMailItemIterator *MBMailItemIterator; typedef OpaqueMBProgressIndicator *MBProgressIndicator; typedef OpaqueMBCopyOperationRef *MBCopyOperationRef; typedef OpaqueMBNotificationRef *MBNotificationRef; enum { kMBMaxNumEnclosures = 50 }; /**********************************************************/ /* Error codes, will be moved to OCEErrors.h */ /***********************************************************/ enum { kOCEIncompletedCallsErr = -15069, /* calls operating within that container have not yet completed */ kOCEInvalidMBContainerTokenErr = -15070, /* the container token specified is invalid */ kOCERefExhaustedErr = -15071, /* all reference slots have been used */ kOCEInvalidIteratorErr = -15072, /* the Iterator specified is not valid */ kOCEItemAlreadyLocalErr = -15073, /* the letter is already local */ kOCEIteratorOutOfRangeErr = -15074, /* the iterator fell off the list of mail items */ kOCEInvalidSortOrder = -15075, /* sort order is invalid or unsupported */ kOCEInvalidSortDirection = -15076, /* sort direction is invalid or unsupported */ kOCEInvalidMailItemFilter = -15077, /* filter is invalid or unsupported */ kOCECopyOperationCanceled = -15078, /* copy operation is canceled */ kOCECopyAlreadyCompleted = -15079, /* copy operation cannot be canceled because it is already finished */ kOCEInvalidContainerType = -15080, /* the specified container type is invalid */ kOCECannotUnmountMailboxErr = -15081, /* cannot unmount the mailbox */ kOCEInvalidLetterSpecErr = -15082, /* letter spec is not valid */ kOCECannotCloseContainerErr = -15083, /* cannot close the container */ kOCEFontNotDeclared = -15084, /* cannot find font in font table */ kOCEFontTableNotFound = -15085 /* cannot find the font table in the letter */ }; #define kOCENoProgressIndicator ((MBProgressIndicator)0) /**********************************************************/ /* Mailbox Gestalt Values */ /**********************************************************/ enum { gestaltOCEMailboxAPIAttr = 'mbxa', gestaltMailboxAPIPresent = 0x01, /* Mailbox API is present */ gestaltSupportsOutbox = 0x02, /* supports outbox access */ gestaltSupportsErrorLog = 0x04 /* supports mailbox error log */ }; /**********************************************************/ /* Mailbox Data Structures */ /**********************************************************/ typedef UInt32 MBMailboxToken; struct MBMailboxData { MBMailboxToken mboxToken; AuthIdentity authID; OSType dataType; OSType creator; OSType dataClass; MailTime modTime; RString64 name; }; typedef struct MBMailboxData MBMailboxData; /* MBPermissions control whether other applications can detect that mailbox has been mounted */ typedef UInt32 MBPermissions; enum { kMBPermissionsPublicMount = 0x00000000, kMBPermissionsPrivateMount = 0x00000001 }; /**********************************************************/ /* Container Data Structures */ /***********************************************************/ /* These structures are used to manipulate and list the mailbox containers. A container is a logical collection of mailbox items. Examples of some standard containers are the inbox and the outbox. */ typedef UInt32 MBContainerType; enum { kMBUndefinedContainerType = 0x00000000, kMBInboxContainerType = 'inbx', kMBOutboxContainerType = 'otbx' }; struct MBContainerToken { UInt32 reserved[3]; }; typedef struct MBContainerToken MBContainerToken; typedef UInt32 MBContainerStatus; enum { kMBConnectionStatusUndefined = 0x00000000, kMBContainerStatusConnected = 0x00000001, kMBContainerStatusNotConnected = 0x00000002 }; typedef UInt32 MBContainerFlags; enum { kMBContainerLocal = 0x00000000, kMBContainerRemote = 0x00000001, kMBContainerLocalAndRemote = 0x00000002 }; typedef UInt32 MBContainerLocation; enum { kMBInboxContainerCreator = 'ptps', kMBOutboxContainerCreator = 'ptps' }; enum { kMBContainerSystemClass = 'sys ', kMBContainerPMSAMClass = 'pmsm', kMBContainerUserClass = 'user' }; typedef UInt32 MBContainerClass; struct MBContainerData { MBContainerToken containerToken; MBContainerToken reserved; MBContainerLocation location; MBContainerStatus status; MBContainerFlags capabilities[3]; OSType containerType; OSType creator; MBContainerClass containerClass; RString64 name; }; typedef struct MBContainerData MBContainerData; typedef UInt8 AddressAsType; /* AddressAsType is actually an enumerated type and its constants kAddressedAs_TO, kAddressedAs_CC, and kAddressedAs_BCC are defined in OCEMail.h in an anonymous enum list. */ struct MBInboxLetterData { MailSeqNum seqNum; MailLetterFlags letterFlags; UInt32 approximateSize; /* approximate size of letter */ MailIndications indications; OCECreatorType creatorType; MailTime sendTime; /* time that message was sent */ OSType family; UInt8 filler; AddressAsType addressedToMe; /* addressed as TO, CC or BCC */ RString64 sender; RString64 subject; /* subject is truncated */ }; typedef struct MBInboxLetterData MBInboxLetterData; struct MBOutboxLetterData { MailSeqNum seqNum; OSType family; /* family this message belongs to */ OCECreatorType creatorType; IPMMsgID messageID; MailTime submitTime; UInt32 approximateSize; /* approximate size of letter */ UInt32 recipientCount; /* number of recipients of message */ UInt32 pendingRecipientCount; /* number of recipients left to send by this slot */ PMSAMStatus state; RString64 subject; /* subject is truncated */ }; typedef struct MBOutboxLetterData MBOutboxLetterData; typedef UInt32 MBMailItemType; enum { kMBMailItemTypeUndefined = 0x00000000, kMBInboxLetter = 0x00000001, kMBOutboxLetter = 0x00000002 }; /* Filters for MBGetMailItemCount */ enum { kMBNoFilterMask = 0x00000000, kMBInTrashFilterMask = kMailInTrashMask }; typedef UInt32 MBMailItemFilter; struct MBMailItemData { MBMailItemType itemType; union { MBInboxLetterData inboxLetter; MBOutboxLetterData outboxLetter; } u; }; typedef struct MBMailItemData MBMailItemData; /* Used to mark an item read or unread using MBMarkLetter */ typedef UInt32 MBLetterReadStatus; enum { kMBLeaveReadMark = 0x00000000, kMBMarkLetterRead = 0x00000001, kMBMarkLetterUnread = 0x00000002 }; /* Used to mark an item in or out of trash using MBMarkLetter */ typedef UInt32 MBLetterTrashStatus; enum { kMBLeaveTrashMark = 0x00000000, kMBMarkLetterInTrash = 0x00000001, kMBMarkLetterNotInTrash = 0x00000002 }; /**********************************************************/ /* Changes Enumeration Data Structures */ /***********************************************************/ typedef UInt32 MBMailItemChangeType; enum { kMBNoChange = 0x00000000, kMBNewLetter = 0x00000001, kMBDeletedLetter = 0x00000002, kMBChangedLetter = 0x00000004, kMBAllChanges = 0x7FFFFFFF }; typedef UInt32 MBNotificationMask; enum { kMBNoNotification = 0x00000000, kMBNotificationNewMailItem = 0x00000001, kMBNotificationDeletedMailItem = 0x00000002, kMBNotificationChangedMailItem = 0x00000004, kMBNotificationMBReset = 0x00000008, /* must re-enumerate container contents */ kMBNotificationMailboxGoingAway = 0x00000010, kMBNotificationMSAMError = 0x00000020, kMBIgnoreThisNotification = 0x80000000, /* for future extensibility */ kMBAllNotifications = 0x7FFFFFFF }; /***********************************************************/ /* For mail item iterators */ /***********************************************************/ typedef UInt32 MBSortOrder; enum { kMBSortOrderMailSeqNum = 0x00000001 }; typedef UInt32 MBSortDirection; enum { kMBAscending = 0 }; /* forward declaration */ typedef union MailboxParam MailboxParam; /*------------------------------------------------------------------------------*/ /* Parameter Blocks for the Operations */ /*------------------------------------------------------------------------------*/ /**********************************************************/ /* Mailbox Operations */ /**********************************************************/ /* Mounts the mailbox. Returns a mailboxRef which should be used on all future operations. */ struct MBMountMailboxPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; AuthIdentity authID; /* --> valid user authentication */ SInt32 reserved1; /* --> must be set to 0 */ UInt32 reserved2; /* --> must be set to 0 */ MBMailboxData * mailboxDataPtr; /* <--> user supplied buffer for mailbox data */ MBMailboxRef mailboxRef; /* <-- allows user to access contents of the mailbox */ }; typedef struct MBMountMailboxPB MBMountMailboxPB; /* Unmounts the Mailbox. After this call, the mailboxRef is no longer valid. */ struct MBUnmountMailboxPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailboxRef mailboxRef; /* --> ref of mailbox to unmount */ SInt32 reserved; /* --> must be set to 0 */ }; typedef struct MBUnmountMailboxPB MBUnmountMailboxPB; /**********************************************************/ /* Container and Mail Item Operations */ /***********************************************************/ /* Opens the container for use, returns a containerRef which should be used in all future Container operations */ struct MBOpenContainerPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailboxRef mailboxRef; /* --> authenticates client to access contents */ MBContainerToken containerToken; /* --> containerToken, persistent accross sessions */ MBOpenContainerRef containerRef; /* <-- specifies the mounted mailbox we are dealing with */ }; typedef struct MBOpenContainerPB MBOpenContainerPB; /* Closes the container and invalidates the containerRef */ struct MBCloseContainerPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> ref to container you wish to close */ Boolean forceClose; /* --> true to close in spite of outstanding letters that have not been closed */ SInt8 filler; }; typedef struct MBCloseContainerPB MBCloseContainerPB; /* Reconnect open container to remote service */ struct MBReconnectOpenContainerPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> the container ref to which to reconnect */ UInt32 reserved1; /* --> must be set to 0 */ UInt32 reserved2; /* --> must be set to 0 */ }; typedef struct MBReconnectOpenContainerPB MBReconnectOpenContainerPB; /* Returns the mail item with the specified mail sequence number */ struct MBGetMailItemDataPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> ref to container from which you wish to get data */ MailSeqNum seqNum; /* --> mail sequence number of the letter */ MBMailItemData * dataPtr; /* <--> user supplied buffer where to copy data */ }; typedef struct MBGetMailItemDataPB MBGetMailItemDataPB; /* Returns the number of items in the container (filtered, if specified) */ struct MBGetMailItemCountPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container whose items are to be counted */ MBMailItemFilter filter; /* --> filter to apply when counting items */ UInt32 count; /* <-- number of items of that type in the container */ }; typedef struct MBGetMailItemCountPB MBGetMailItemCountPB; /* Allocates the memory and sets the Iterator to the first of the mail items of that type in the container. */ struct MBCreateMailItemIteratorPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> ref of container where iterator should be set */ MBSortOrder sortOrder; /* --> sort order */ MBSortDirection sortDirection; /* --> sort direction */ SInt32 reserved[2]; /* --> must be set to 0 */ MBMailItemIterator iterator; /* <-- iterator returned here, client allocates memory */ }; typedef struct MBCreateMailItemIteratorPB MBCreateMailItemIteratorPB; /* Dispose of the MBMailItemIterator */ struct MBDisposeMailItemIteratorPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailItemIterator iterator; /* --> the iterator to dispose of */ }; typedef struct MBDisposeMailItemIteratorPB MBDisposeMailItemIteratorPB; struct MBMailItemIteratePB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailItemIterator iterator; /* <--> iterator to move */ MBMailItemData * dataPtr; /* <--> user supplied buffer where to copy data */ }; typedef struct MBMailItemIteratePB MBMailItemIteratePB; struct MBResetMailItemIteratorPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailItemIterator iterator; /* <--> mail item iterator to reset */ }; typedef struct MBResetMailItemIteratorPB MBResetMailItemIteratorPB; /* MarkLetter Read/Unread and/or In Trash/Out of Trash. */ struct MBMarkLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container in which letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the letter */ MBLetterReadStatus readMark; /* --> must be kMBLetterRead, kMBLetterUnread or kMBLeaveReadMark */ MBLetterTrashStatus trashMark; /* --> must be kMBLetterNotInTrash, kMBLetterInTrash or kMBLeaveTrashMark */ }; typedef struct MBMarkLetterPB MBMarkLetterPB; /* Stores the MailItem locally. */ struct MBCopyLocalPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container in which letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the desired letter */ MBProgressIndicator progressIndicator; /* --> created using MBCreateProgressIndicatoror kOCENoProgressIndicator if client does not desire progress indication. */ MBCopyOperationRef copyOperationRef; /* <-- ref to this copy operation for use in cancel */ MailSeqNum newSeqNum; /* <-- seqNum of new letter after successful operation */ }; typedef struct MBCopyLocalPB MBCopyLocalPB; struct MBCopyToFilePB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container in which letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the desired letter */ FSSpecPtr specPtr; /* --> spec of file which will contain the local copy */ MBProgressIndicator progressIndicator; /* --> created using MBCreateProgressIndicator or kOCENoProgressIndicator if client does not desire progress indication. */ MBCopyOperationRef copyOperationRef; /* <-- ref to this copy operation for use in cancel */ }; typedef struct MBCopyToFilePB MBCopyToFilePB; /* Cancels the copy operation, if possible. */ struct MBCancelCopyPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBCopyOperationRef copyOperationRef; /* --> reference to copyLocal or copyToFile operation to cancel */ }; typedef struct MBCancelCopyPB MBCancelCopyPB; /* An irrevocable delete of an item from a container. */ struct MBDeleteLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container in which letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the letter to delete */ }; typedef struct MBDeleteLetterPB MBDeleteLetterPB; /* Forces a MailItem to be sent right now. This operation only works on MailItems in the outbox.*/ struct MBSendNowPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> ref of the outbox container in which letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the letter to send */ Duration timeOut; /* --> time in seconds to wait for a response from server */ }; typedef struct MBSendNowPB MBSendNowPB; /**********************************************************/ /* Notification and Changes Enumeration Operations */ /***********************************************************/ typedef pascal void (*MBNotificationProcPtr)(MBOpenContainerRef containerRef, MBNotificationMask actualChanges, void *contextPtr, MBMailItemData *item); #if GENERATINGCFM typedef UniversalProcPtr MBNotificationUPP; #else typedef MBNotificationProcPtr MBNotificationUPP; #endif /* Allows a client to specify a callback routine and parameters. */ struct MBRegisterNotificationPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container for which to receive notifications */ MBNotificationUPP handler; /* --> UPP of callback to call when changes occur */ MBNotificationMask mask; /* --> which events should cause a notification */ void * contextPtr; /* --> pointer to client-defined buffer is passed to handler */ MBNotificationRef notificationRef; /* <-- reference to the newly registered notification */ SInt32 reserved; /* --> must be set to 0 */ }; typedef struct MBRegisterNotificationPB MBRegisterNotificationPB; /* Allows client to clear the callback info. */ struct MBUnregisterNotificationPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBNotificationRef notificationRef; /* --> reference to the notification to unregister */ }; typedef struct MBUnregisterNotificationPB MBUnregisterNotificationPB; /**********************************************************/ /* Progress Indication Operations */ /***********************************************************/ /* Creates a progress indicator for tracking progress of a copy operation from MBCopyToFile or MBCopyLocal. */ struct MBCreateProgressIndicatorPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBProgressIndicator progressIndicator; /* <-- a progress indicator is returned here */ }; typedef struct MBCreateProgressIndicatorPB MBCreateProgressIndicatorPB; /* Dispose the progress indicator that was previously allocated by MBCreateProgressIndicator. */ struct MBDisposeProgressIndicatorPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBProgressIndicator progressIndicator; /* --> the progress indicator to be destroyed */ }; typedef struct MBDisposeProgressIndicatorPB MBDisposeProgressIndicatorPB; /* Returns the current level of progress that has been completed. The following fields can be polled during the the move in order to provide a "progress" indicator. The operation will be done when workCompleted equals totalWorkAmount. totalWorkAmount is pretty much a random number and is not an indication of the amount of work involved. */ struct MBGetCurrentProgressPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBProgressIndicator progressIndicator; UInt32 totalWorkAmount; /* <-- total amount of work that needs to be done, arbitrary units */ UInt32 workCompleted; /* <-- how much work was completed, between 0 and fTotalWorkAmount */ }; typedef struct MBGetCurrentProgressPB MBGetCurrentProgressPB; /**********************************************************/ /* Miscellaneous Operations */ /***********************************************************/ /* Returns the LetterSpec of a letter for use with Mailer APIs. */ struct MBGetLetterSpecPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> container within which the letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the letter */ LetterSpec * specPtr; /* <--> letter spec is returned here, client-supplied buffer */ }; typedef struct MBGetLetterSpecPB MBGetLetterSpecPB; /* Obtain a mail sequence number and open container reference from a letter spec */ struct MBConvertLetterSpecPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; LetterSpec * specPtr; /* --> letter spec to convert */ MBOpenContainerRef containerRef; /* <-- open container reference for input letter spec */ MailSeqNum seqNum; /* <-- mail sequence number for input letter spec */ }; typedef struct MBConvertLetterSpecPB MBConvertLetterSpecPB; /* Returns the containerID given a well known container type */ struct MBGetContainerTokenPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailboxRef mailboxRef; /* --> the ref of the desired mailbox */ MBContainerType containerType; /* --> one of the well known container types */ MBContainerToken containerToken; /* <-- the container Token returned here */ }; typedef struct MBGetContainerTokenPB MBGetContainerTokenPB; /* Returns ContainerData for a given ContainerToken. */ struct MBGetContainerDataFromTokenPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBMailboxRef mailboxRef; /* --> the ref of the desired mailbox */ MBContainerToken containerToken; /* --> container you wish to get data from */ MBContainerData * dataPtr; /* --> user supplied buffer where to write the data */ }; typedef struct MBGetContainerDataFromTokenPB MBGetContainerDataFromTokenPB; /**********************************************************/ /* Contents Operations */ /***********************************************************/ /* Opens a letter that is currently in a container. */ struct MBOpenLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MBOpenContainerRef containerRef; /* --> open container where the letter resides */ MailSeqNum seqNum; /* --> mail sequence number of the desired letter */ MailMsgRef msgRef; /* <-- the MailMsgRef authenticates the client to view the contents */ }; typedef struct MBOpenLetterPB MBOpenLetterPB; /* Opens a letter that is currently on the disk. */ struct MBOpenDiskLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; FSSpec diskLetter; /* --> the location of the mail item on disk */ MailMsgRef msgRef; /* <-- the MailMsgRef authenticates the client to view the contents */ }; typedef struct MBOpenDiskLetterPB MBOpenDiskLetterPB; /* Closes a letter that is currently open. */ struct MBCloseLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> mail sequence number of the letter to close */ }; typedef struct MBCloseLetterPB MBCloseLetterPB; /* Opens a letter that is nested within another. */ struct MBOpenNestedLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> MailMsgRef of the containing letter */ MailMsgRef nestedMsgRef; /* <-- MailMsgRef of the nested letter */ }; typedef struct MBOpenNestedLetterPB MBOpenNestedLetterPB; /* Returns the path where the enclosures of a certain letter are kept. */ struct MBReadEnclosureFSSpecPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message for which to read enclosure information */ FSSpec enclosureDir; /* <-- full path of directory where enclosures are stored */ }; typedef struct MBReadEnclosureFSSpecPB MBReadEnclosureFSSpecPB; /* Returns the path where the content of a certain letter is kept. */ struct MBReadContentFSSpecPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message for which to read the content */ FSSpec enclosureDir; /* <-- full path and file name for main enclosure */ }; typedef struct MBReadContentFSSpecPB MBReadContentFSSpecPB; /* Enumerates across the blocks of a letter. */ struct MBEnumerateBlocksPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> letter whose blocks are to be enumerated */ UInt16 startIndex; /* --> starting block index */ MailBuffer buffer; /* <--> user-allocated buffer where blocks are returned */ UInt16 nextIndex; /* <-- Index of next block returned here */ Boolean more; /* <-- true if more blocks to process */ SInt8 filler; }; typedef struct MBEnumerateBlocksPB MBEnumerateBlocksPB; /* Returns a buffer of all the recipients of a certain letter */ struct MBReadRecipientsPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message about which to get recipient info */ MailAttributeID attrID; /* --> type of recipient, kMailFromBit through kMailBccBit */ UInt16 startIndex; /* --> position in recipient list at which to begin, starts at 1 */ MailBuffer buffer; /* <--> buffer contains a Mail Reply. Each tuple is an OCEPackedRecipient. Each tuple is word aligned. */ UInt16 nextIndex; /* <-- Index of next tuple that didn't fit in buffer */ Boolean more; /* <-- true if there are more recipient tuples to process */ SInt8 filler; }; typedef struct MBReadRecipientsPB MBReadRecipientsPB; /* Reads the attributes of a letter as specified in the requestMask. */ /* buffer returned will contain the attribute values of the attributes indicated in responseMask, from the attribute indicated by the least significant bit set to the attribute indicated by the most significant bit set. Note that recipients - from, to, cc, bcc cannot be read using this call. Use GetRecipients to read these. */ struct MBReadAttributesPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> letter whose attributes you wish to get */ MailAttributeBitmap requestMask; /* --> which attributes to get, kMailIndicationsBit through kMailSubjectBit */ MailBuffer buffer; /* <--> attributes returned in this user supplied buffer */ MailAttributeBitmap responseMask; /* <-- returns bits of those attributes that were returned */ Boolean more; /* <-- true if there are more recipient tuples to process */ SInt8 filler; }; typedef struct MBReadAttributesPB MBReadAttributesPB; /* Reads the block of a letter. */ struct MBReadBlockPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> letter whose blocks you wish to read */ OCECreatorType blockType; /* --> specifies creator and type of the block to read */ UInt16 blockIndex; /* --> relative position of the block of that type to read */ MailBuffer buffer; /* <--> user suppied buffer to reciev the information */ UInt32 dataOffset; /* --> byte offset within the block at which to start reading */ Boolean endOfBlock; /* <-- indicates whether the call has returned the entire block */ SInt8 filler; UInt32 remaining; /* <-- number of bytes of data remaining in the block */ }; typedef struct MBReadBlockPB MBReadBlockPB; /* Returns a SignatureContext that can be used to verify a signature. */ struct MBVerifySignaturePB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> letter containing the signature to verify */ SIGContextPtr signatureContext; /* --> previously obtained signature context */ }; typedef struct MBVerifySignaturePB MBVerifySignaturePB; /* Creates a letter given the relevant info about the letter. */ struct MBCreateLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* <-- MailMsgRef of the letter just created */ AuthIdentity senderIdentity; /* --> authenticated identity of the sender */ IPMMsgType msgType; /* --> type, creator, and class of the sending application */ Boolean diskForm; /* --> true to create letter on disk, otherwise in the outbox */ SInt8 filler; FSSpec diskLetter; /* --> diskForm is true, it specifies where to create the letter */ Boolean bccRecipients; /* --> set to true if creating letter with bcc recipients */ SInt8 filler2; }; typedef struct MBCreateLetterPB MBCreateLetterPB; /* Submits a letter for processing. */ struct MBSubmitLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> ref to the letter that you wish to submit */ Boolean submitFlag; /* --> throw letter away if submitFlag is false */ SInt8 filler; MailLetterID letterID; /* <-- persistent ID of the letter accross the whole system */ SIGSignaturePtr signaturePtr; /* --> pointer to digital signature */ Size signatureSize; /* --> size of the digital signature */ SIGContextPtr signatureContext; /* --> pointer to the signature context */ }; typedef struct MBSubmitLetterPB MBSubmitLetterPB; /* Begin a nested mail item within some mail item. */ struct MBBeginNestedLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> the letter within which you wish to nest */ SInt32 reserved; /* --> must be set to NIL */ IPMMsgType msgType; /* --> creator and type of the nested message to create */ }; typedef struct MBBeginNestedLetterPB MBBeginNestedLetterPB; /* End the nested mail item. This function is always executed synchronously. */ struct MBEndNestedLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> the message containing the nested letter to end */ }; typedef struct MBEndNestedLetterPB MBEndNestedLetterPB; /* Add attributes to a mail item. */ struct MBAddAttributePB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> the letter to wich you wish to add an attribute */ MailAttributeID attrID; /* --> the type of attribute to add */ MailBuffer buffer; /* <--> attributes stored in buffer are copied to the mail item */ }; typedef struct MBAddAttributePB MBAddAttributePB; /* Adds an enclosure to a mail item. This function is always executed synchronously. */ struct MBAddEnclosurePB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> the letter to wich you wish to add an enclosure */ Boolean contentEnclosure; /* --> whethet this enclosure contains the main content of the mail */ SInt8 filler; Boolean hfs; /* --> true if in the file system, false if in memory */ Boolean append; /* --> whether to append data in buffer to current enclosure */ MailBuffer buffer; /* <--> unused if hfs is true, otherwise it contains the file’s resource and data forks */ FSSpec enclosure; /* --> specifies the file or folder you wish to enclose */ MailEnclosureInfo addlInfo; /* --> specifies file system info for the enclosure */ }; typedef struct MBAddEnclosurePB MBAddEnclosurePB; /* Adds a block to a mail item. */ struct MBAddBlockPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> the message to wich you wish to add a block */ SInt32 refCon; /* --> reserved for your use */ OCECreatorType blockType; /* --> creator and type of the block that you want to write */ Boolean append; /* --> whether to append the data in you buffer to the current block */ SInt8 filler; MailBuffer buffer; /* <--> stores the data you want to write to the message */ MailBlockMode mode; /* --> if blockType is kMailTunnelLtrType or kMailHopInfoType mode is assumed to be kMailFromMark */ UInt32 offset; /* --> offset to use to determine the starting point of the write set to 0 to start new block, ignored when append is false */ }; typedef struct MBAddBlockPB MBAddBlockPB; /* Adds a letter to another one. */ struct MBAddLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef newMsgRef; /* --> the new letter you are composing */ MailMsgRef msgRef; /* --> the original letter you want to add to the new letter */ }; typedef struct MBAddLetterPB MBAddLetterPB; /* Adds content to a mail item. */ struct MBAddContentPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message from which to add some content */ MailSegmentType segmentType; /* --> segment type of data tou want to write */ Boolean append; /* --> whether to copy data from buffer into mail item */ SInt8 filler; MailBuffer buffer; /* <--> place the data in this buffer */ StScrpRec * textScrap; /* --> a pointer to a style scrap structure */ Boolean startNewScript; /* --> whether the data in buffer uses a new character set */ SInt8 filler2; ScriptCode script; /* --> valid only if startNewScript is true */ }; typedef struct MBAddContentPB MBAddContentPB; /* Reads the content of a mail item. */ struct MBReadContentPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message from which to read the content */ MailSegmentMask segmentMask; /* --> the types of segments that you want to read */ MailBuffer buffer; /* <--> user suppiled buffer into which to write the segment */ StScrpRec * textScrap; /* <--> a pointer to a style scrap structure */ ScriptCode script; /* <-- the character set of the text placed in your buffer */ MailSegmentType segmentType; /* <-- the type of the current data segment */ Boolean endOfScript; /* <-- whether the text in your buffer is the end of a script run */ Boolean endOfSegment; /* <-- whether we reached the end of a segment */ Boolean endOfContent; /* <-- whether we reached the end of the letter's content block */ SInt8 filler; SInt32 segmentLength; /* <-- number of bytes in the current segment */ SInt32 segmentID; /* <--> segment identifier */ }; typedef struct MBReadContentPB MBReadContentPB; /* Adds another recipient to a mail item. */ struct MBAddRecipientPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> message to which to add recipient information */ MailAttributeID attrID; /* --> type of recipient to add to the message */ MailRecipient * recipient; /* --> where you provide complete addressing information about recipient */ Boolean invalid; /* --> Must be set to false */ SInt8 filler; }; typedef struct MBAddRecipientPB MBAddRecipientPB; /* Gets a font name from the letter, given a font number */ struct MBGetFontNameFromLetterPB { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; MailMsgRef msgRef; /* --> letter reference from which to get font table */ SInt16 fontNum; /* --> font number to obtain name of */ SInt16 filler; StringPtr fontName; /* <--> user supplied buffer to be filled with font name */ }; typedef struct MBGetFontNameFromLetterPB MBGetFontNameFromLetterPB; union MailboxParam { struct { void * qLink; SInt32 reservedH1; SInt32 reservedH2; MSAMIOCompletionUPP ioCompletion; OSErr ioResult; SInt32 saveA5; SInt16 reqCode; } header; /* Mailbox Operations */ MBMountMailboxPB mountMailboxPB; MBUnmountMailboxPB unmountMailboxPB; /* Container and Letter Operations */ MBOpenContainerPB openContainerPB; MBCloseContainerPB closeContainerPB; MBReconnectOpenContainerPB reconnectOpenContainerPB; MBGetMailItemDataPB getMailItemDataPB; MBGetMailItemCountPB getMailItemCountPB; MBCreateMailItemIteratorPB createMailItemIteratorPB; MBDisposeMailItemIteratorPB disposeMailItemIteratorPB; MBMailItemIteratePB mailItemIteratePB; MBResetMailItemIteratorPB resetMailItemIteratorPB; MBMarkLetterPB markLetterPB; MBCopyLocalPB copyLocalPB; MBCopyToFilePB copyToFilePB; MBCancelCopyPB cancelCopyPB; MBDeleteLetterPB deleteLetterPB; MBSendNowPB sendNowPB; /* Notification and Changes Iterator Operations */ MBRegisterNotificationPB registerNotificationPB; MBUnregisterNotificationPB unregisterNotificationPB; /* Progress Indicator Operations */ MBCreateProgressIndicatorPB createProgressIndicatorPB; MBDisposeProgressIndicatorPB disposeProgressIndicatorPB; MBGetCurrentProgressPB getCurrentProgressPB; /* Miscellaneous Operations */ MBGetLetterSpecPB getLetterSpecPB; MBConvertLetterSpecPB convertLetterSpecPB; MBGetContainerTokenPB getContainerTokenPB; MBGetContainerDataFromTokenPB getContainerDataFromTokenPB; /* Contents Operations */ MBOpenLetterPB openLetterPB; MBOpenDiskLetterPB openDiskLetterPB; MBCloseLetterPB closeLetterPB; MBOpenNestedLetterPB openNestedLetterPB; MBReadEnclosureFSSpecPB readEnclosureFSSpecPB; MBReadContentFSSpecPB readContentFSSpecPB; MBEnumerateBlocksPB enumerateBlocksPB; MBReadRecipientsPB readRecipientsPB; MBReadAttributesPB readAttributesPB; MBReadBlockPB readBlockPB; MBVerifySignaturePB verifySignaturePB; MBCreateLetterPB createLetterPB; MBSubmitLetterPB submitLetterPB; MBBeginNestedLetterPB beginNestedLetterPB; MBEndNestedLetterPB endNestedLetterPB; MBAddAttributePB addAttributePB; MBAddEnclosurePB addEnclosurePB; /* this variant is SYSTEM8_DEPRECATED*/ MBAddBlockPB addBlockPB; MBAddLetterPB addLetterPB; MBAddContentPB addContentPB; MBReadContentPB readContentPB; MBAddRecipientPB addRecipientPB; MBGetFontNameFromLetterPB getFontNameFromLetterPB; }; /*------------------------------------------------------------------------------*/ /* FUNCTION PROTOTYPES */ /*------------------------------------------------------------------------------*/ /**********************************************************/ /* Mailbox Operations */ /***********************************************************/ extern pascal OSErr MBMountMailbox(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0578, 0xAA5E); extern pascal OSErr MBUnmountMailbox(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0579, 0xAA5E); /**********************************************************/ /* MailItem Operations */ /***********************************************************/ extern pascal OSErr MBOpenContainer(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0582, 0xAA5E); extern pascal OSErr MBCloseContainer(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0583, 0xAA5E); extern pascal OSErr MBReconnectOpenContainer(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x057F, 0xAA5E); extern pascal OSErr MBGetMailItemData(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0592, 0xAA5E); extern pascal OSErr MBGetMailItemCount(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0584, 0xAA5E); extern pascal OSErr MBCreateMailItemIterator(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0585, 0xAA5E); extern pascal OSErr MBDisposeMailItemIterator(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0586, 0xAA5E); extern pascal OSErr MBMailItemIterate(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0587, 0xAA5E); extern pascal OSErr MBResetMailItemIterator(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0588, 0xAA5E); extern pascal OSErr MBMarkLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x058C, 0xAA5E); extern pascal OSErr MBCopyLocal(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x058D, 0xAA5E); extern pascal OSErr MBCopyToFile(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x058E, 0xAA5E); extern pascal OSErr MBCancelCopy(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x058F, 0xAA5E); extern pascal OSErr MBDeleteLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0590, 0xAA5E); extern pascal OSErr MBSendNow(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0591, 0xAA5E); /**********************************************************/ /* MailItem Changes Operations */ /***********************************************************/ extern pascal OSErr MBRegisterNotification(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0596, 0xAA5E); extern pascal OSErr MBUnregisterNotification(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0597, 0xAA5E); /**********************************************************/ /* Progress Indicator Operations */ /**********************************************************/ extern pascal OSErr MBCreateProgressIndicator(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x059C, 0xAA5E); extern pascal OSErr MBDisposeProgressIndicator(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x059D, 0xAA5E); extern pascal OSErr MBGetCurrentProgress(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x059E, 0xAA5E); /**********************************************************/ /* Miscellaneous Operations */ /***********************************************************/ extern pascal OSErr MBGetLetterSpec(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x059F, 0xAA5E); extern pascal OSErr MBConvertLetterSpec(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0599, 0xAA5E); extern pascal OSErr MBGetContainerToken(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0589, 0xAA5E); extern pascal OSErr MBGetContainerDataFromToken(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x058A, 0xAA5E); /**********************************************************/ /* Contents Operations */ /***********************************************************/ extern pascal OSErr MBOpenLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A0, 0xAA5E); extern pascal OSErr MBOpenDiskLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A1, 0xAA5E); extern pascal OSErr MBCloseLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A2, 0xAA5E); extern pascal OSErr MBOpenNestedLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A3, 0xAA5E); extern pascal OSErr MBReadEnclosureFSSpec(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A4, 0xAA5E); extern pascal OSErr MBReadContentFSSpec(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A5, 0xAA5E); extern pascal OSErr MBEnumerateBlocks(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A6, 0xAA5E); extern pascal OSErr MBReadRecipients(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A7, 0xAA5E); extern pascal OSErr MBReadAttributes(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A8, 0xAA5E); extern pascal OSErr MBReadBlock(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05A9, 0xAA5E); extern pascal OSErr MBVerifySignature(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AA, 0xAA5E); extern pascal OSErr MBCreateLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AB, 0xAA5E); extern pascal OSErr MBSubmitLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AC, 0xAA5E); extern pascal OSErr MBBeginNestedLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AD, 0xAA5E); extern pascal OSErr MBEndNestedLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AE, 0xAA5E); extern pascal OSErr MBAddAttribute(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05AF, 0xAA5E); extern pascal OSErr MBAddEnclosure(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B0, 0xAA5E); extern pascal OSErr MBAddBlock(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B1, 0xAA5E); extern pascal OSErr MBAddLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B2, 0xAA5E); extern pascal OSErr MBAddContent(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B3, 0xAA5E); extern pascal OSErr MBReadContent(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B4, 0xAA5E); extern pascal OSErr MBAddRecipient(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x05B5, 0xAA5E); extern pascal OSErr MBGetFontNameFromLetter(MailboxParam *mailParam, Boolean async) THREEWORDINLINE(0x3F3C, 0x0598, 0xAA5E); #if GENERATINGCFM #else #endif enum { uppMBNotificationProcInfo = kPascalStackBased | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MBOpenContainerRef))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(MBNotificationMask))) | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *))) | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(MBMailItemData *))) }; #if GENERATINGCFM #define NewMBNotificationProc(userRoutine) \ (MBNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMBNotificationProcInfo, GetCurrentArchitecture()) #else #define NewMBNotificationProc(userRoutine) \ ((MBNotificationUPP) (userRoutine)) #endif #if GENERATINGCFM #define CallMBNotificationProc(userRoutine, containerRef, actualChanges, contextPtr, item) \ CallUniversalProc((UniversalProcPtr)(userRoutine), uppMBNotificationProcInfo, (containerRef), (actualChanges), (contextPtr), (item)) #else #define CallMBNotificationProc(userRoutine, containerRef, actualChanges, contextPtr, item) \ (*(userRoutine))((containerRef), (actualChanges), (contextPtr), (item)) #endif #endif #if PRAGMA_ALIGN_SUPPORTED #pragma options align=reset #endif #if PRAGMA_IMPORT_SUPPORTED #pragma import off #endif #ifdef __cplusplus } #endif #endif /* __OCEMAILBOX__ */